<nz-spin [nzSpinning]="isSpinning" [nzTip]="'正在初始化模块信息...'">
  <section class="in-index">
    <div class="table-operations" style="margin: 16px 0;padding: 0 2%">
      <button style="background: #ef4954;color: #fff;" nz-button (click)="classadd('add')">
        <i class="anticon anticon-plus"></i>
        <span>新增</span>
      </button>
      <button nz-button [disabled]="!allChecked && !indeterminate " (click)="delestudent()">
        <i class="anticon anticon-close-circle-o"></i>
        <span>删除</span>
      </button>
      <button nz-button (click)="getEntityList()" [nzLoading]="loadingData">
        <i class="anticon anticon-reload"></i>
        <span>刷新</span>
      </button>
    </div>
    <app-search-bar-widget (searchEvent)='searchBar($event)' [searchTextFieldName]='"studentName"'></app-search-bar-widget>
    <nz-table
    [nzLoading]="loadingData" [nzFrontPagination]="false"
    [nzTotal]="listEntities.recordTotalCount" [(nzPageIndex)]="listEntities.currentPageIndex" (nzPageIndexChange)="getEntityListAsync(true)"
    [(nzPageSize)]="listEntities.pageSize"
    #nzTable #nzFixedHeader nzBordered
    #rowSelectionTable
    [nzData]="listEntities.entities"
    (nzCurrentPageDataChange)="currentPageDataChange($event)">
      <thead nz-thead>
        <tr>
          <th nzShowCheckbox [(nzChecked)]="allChecked" [nzIndeterminate]="indeterminate" (nzCheckedChange)="checkAll($event)" style="width: 60px;">
          </th>
          <th style="text-align: center;">
            <span>用户名</span>
          </th>
          <th style="text-align: center;">
            <span>姓名</span>
          </th>
          <th style="text-align: center;">
            <span>学号</span>
          </th>
          <th style="text-align: center;">
            <span>电话</span>
          </th>
          <th style="text-align: center;">
            <span>班级</span>
          </th>
          <th nz-th style="text-align: center;">操作</th>
        </tr>
      </thead>
      <tbody nz-tbody style="text-align: center;">
        <tr nz-tbody-tr *ngFor="let data of rowSelectionTable.data;let i=index;">
          <td nzShowCheckbox [(nzChecked)]="data.checked" (nzCheckedChange)="refreshStatus1(data.id,$event)"></td>
          <td nz-td>
            <span>{{data.userName}}</span>
          </td>
          <td nz-td>
            <span>{{data.personName}}</span>
          </td>
          <td nz-td>
            <span>{{data.personNo}}</span>
          </td>
          <td nz-td>
            <span>{{data.phoneNumber}}</span>
          </td>
          <td nz-td>
            <span>{{data.className}}</span>
          </td>
          <td nz-td>
            <a (click)="ngpassword(data.id)">
              <i class="anticon anticon-edit"></i>重置密码</a>
            <a (click)="editor(data.id)">
              <i class="anticon anticon-edit"></i>编辑</a>
          </td>
        </tr>
      </tbody>
    </nz-table>
    <!-- <nz-modal [(nzVisible)]="isVisible" nzTitle="编辑" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk('success')">
      <nz-form-item>
        <nz-form-label [nzSpan]="6" nzFor="noticeName">使用时限</nz-form-label>
        <nz-form-control [nzSpan]="14">
          <nz-radio-group [(ngModel)]="radioValueflex">
            <label nz-radio-button nzValue='false'>试用</label>
            <label nz-radio-button nzValue='true'>正式</label>
          </nz-radio-group>
          &nbsp;&nbsp;
          <nz-date-picker *ngIf="radioValueflex=='false'" style="width: 100px" [nzFormat]="dateFormat" [(ngModel)]="time"></nz-date-picker>
        </nz-form-control>
      </nz-form-item>
      <nz-form-item>
        <nz-form-label [nzSpan]="6" nzFor="noticeName">学校名称</nz-form-label>
        <nz-form-control [nzSpan]="14">
          <input placeholder="请输入学校名称" style="width: 260px" nz-input [id]="noticeContent4" [(ngModel)]="schoolName" />
          <span style="color: red">*</span>
        </nz-form-control>
      </nz-form-item>
      <nz-form-item>
        <nz-form-label [nzSpan]="6" nzFor="noticeName">学院名称</nz-form-label>
        <nz-form-control [nzSpan]="14">
          <input placeholder="请输入学校名称" style="width: 260px" nz-input [id]="noticeContent6" [(ngModel)]="collegelName" />
          <span style="color: red">*</span>
        </nz-form-control>
      </nz-form-item>
      <nz-form-item>
        <nz-form-label [nzSpan]="6" nzFor="noticeContent">负责人姓名</nz-form-label>
        <nz-form-control [nzSpan]="14">
          <input placeholder="请填写姓名" style="width: 260px" nz-input [id]="noticeContent" [(ngModel)]="personName" />
          <span style="color: red">*</span>
        </nz-form-control>
      </nz-form-item>
      <nz-form-item>
        <nz-form-label [nzSpan]="6" nzFor="noticeContent">负责人电话</nz-form-label>
        <nz-form-control [nzSpan]="14">
          <input placeholder="请填写电话" style="width: 260px" nz-input [id]="noticeContent1" [(ngModel)]="personPhone" />
          <span style="color: red">*</span>
        </nz-form-control>
      </nz-form-item>
      <nz-form-item>
        <nz-form-label [nzSpan]="6" nzFor="noticeContent">负责人邮箱</nz-form-label>
        <nz-form-control [nzSpan]="14">
          <input placeholder="请填写邮箱" style="width: 260px" nz-input [id]="noticeContent2" [(ngModel)]="personEmail" />
          <span style="color: red">*</span>
        </nz-form-control>
      </nz-form-item>
      <nz-form-item>
        <nz-form-label [nzSpan]="6" nzFor="noticeContent">用户名</nz-form-label>
        <nz-form-control [nzSpan]="14">
          <input placeholder="请填写用户名" style="width: 260px" nz-input [id]="noticeContent3" [(ngModel)]="personUserName" />
          <span style="color: red">*</span>
        </nz-form-control>
      </nz-form-item>
      <nz-form-item>
        <nz-form-label [nzSpan]="6" nzFor="noticeContent">密码</nz-form-label>
        <nz-form-control [nzSpan]="14">
          <input placeholder="请填写密码" type="text" style="width: 260px" nz-input [id]="personPassword" [(ngModel)]="personPassword" />
          <span style="color: red">*</span>
        </nz-form-control>
      </nz-form-item>
    </nz-modal> -->
    <nz-modal [(nzVisible)]="isVisiblemm" nzTitle="编辑" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOkmm('success')">

      <nz-form-item>
        <nz-form-label [nzSpan]="6" nzFor="noticeContent111">新密码</nz-form-label>
        <nz-form-control [nzSpan]="14">
          <input placeholder="请填写密码" type="text" style="width: 260px" nz-input [(ngModel)]="repassword" />
          <span style="color: red">*</span>
        </nz-form-control>
      </nz-form-item>

    </nz-modal>
    <nz-modal [(nzVisible)]="smisVisible" nzTitle="确定要删除吗？" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOksm('success')">
      <p>已选中{{checkedNumber}}条</p>
    </nz-modal>
  </section>
</nz-spin>
